package com;

import java.awt.*;

public class Explode {
    int x,y;
    private boolean live = true;

    private TankClient tc;

    int[]  diameter = {4,10,15,25,40,70,50,30,10};
    int step = 0;

    public Explode(int x,int y,TankClient tc){
        this.x = x;
        this.y = y;
        this.tc = tc;
    }

    public void draw(Graphics g){
        if (!live)


            return;

        if (step == diameter.length){
            live = false;
            step = 0;
            return;
        }

        Color c = g.getColor();
        g.setColor(Color.YELLOW);
        g.fillOval(x,y,diameter[step], diameter[step]);
        g.setColor(c);

        step ++;
    }
}
